package ${entity.servicePackage};

import ${entity.javaPackage}.${entity.className};
import ${entity.repositoryPackage}.${entity.className}Repository;
import com.ipzoe.common.util.DefaultService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * ${entity.describe}Service
 * <p>
 * Created ${entity.currentDate}.
 *
 * @author pfzhang
*/
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class ${entity.className}Service<#if entity.superclass?has_content> extends DefaultService<${entity.className}> </#if>{

    private ${entity.className}Repository ${entity.name}Repository;

    @Resource
    public void set${entity.className}(${entity.className}Repository ${entity.name}Repository) {
        this.${entity.name}Repository = ${entity.name}Repository;
        super.setDefaultMapper(${entity.name}Repository);
    }
}